package View;

import java.sql.PreparedStatement;
import java.util.List;
import javax.swing.JOptionPane;
import javax.swing.plaf.ComboBoxUI;
import javax.swing.table.DefaultTableModel;
import model.DAO.LoginDAO;
import model.DAO.RoleDAO;
import model.DAO.RoomDAO;
import model.entities.Login;
import model.entities.Role;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Hieu.Nguyen
 */
public class QuanLyNhanVien extends javax.swing.JPanel {

    /**
     * Creates new form QuanLyNhanVien
     */
    public QuanLyNhanVien() {
        initComponents();
        loadTableLogin(refreshCourseList());
        loadCBRoleName();
        setEnableComponent(false);
    }
       public List<Login> refreshCourseList() {
        
       List<Login> loginList;
       loginList = model.DAO.LoginDAO.getInstance().getLogin(true);

        return loginList;
    }
        public void loadCBRoleName() {
            List<Role> listRL = RoleDAO.getInstance().getRole(true);
            for (Role ro : listRL) {
            cboRole.addItem(ro.getRoleID()+ "-" + ro.getRoleName());
        }
   }

    public void loadTableLogin(List<Login> list) {
        DefaultTableModel dtm = (DefaultTableModel) jTable1.getModel();
        String[] colNames = {"UserID", "UserName","Password","RoleName", "UserFirstName","UserMiddleName","UserLastName","UserContactInfo"};
        dtm.setColumnIdentifiers(colNames);
        dtm.setNumRows(0);

        for (Login stud : list) {
            String[] cells = new String[8];
            cells[0] =  String.valueOf(stud.getUserID());
            cells[1] = stud.getUserName();
            cells[2] = stud.getPassword();
            cells[3] = stud.getRoleName().getRoleName();
            cells[4] = stud.getUserFirstName();
            cells[5] = stud.getUserMiddleName();
            cells[6] = stud.getUserLastName();
            cells[7] = stud.getUserContactInfo();
            //cells[8] = stud. ? rb.getString("male") : rb.getString("female");
            
            dtm.addRow(cells);
        }
    }
        public void setEnableComponent(boolean isTrue) {
        txtUserID.setEnabled(false);
        txtUserFirstName.setEnabled(isTrue);
        txtUserMiddleName.setEnabled(isTrue);
        txtUserLastName.setEnabled(isTrue);
        txtUserName.setEnabled(isTrue);
        txtPassword.setEnabled(isTrue);
        txtUserContacInfo.setEnabled(isTrue);
        cboRole.setEnabled(isTrue);
        btnDeleteLogin.setEnabled(isTrue);
        btnEdit.setEnabled(isTrue);
        btnSave.setEnabled(isTrue);
        btnCanel.setEnabled(isTrue);
        
    }
    
    
    public void binding() {
        try {
            int rowIndex = jTable1.getSelectedRow();

            String userID = (String) jTable1.getValueAt(rowIndex, 0);
            txtUserID.setText(userID);
            
            String username = (String) jTable1.getValueAt(rowIndex, 1);
            txtUserName.setText(username);
            
            String pass = (String) jTable1.getValueAt(rowIndex, 2);
            txtPassword.setText(pass);
            
            
            String firstName = (String) jTable1.getValueAt(rowIndex, 4);
            txtUserFirstName.setText(firstName);
            
            String middleName = (String) jTable1.getValueAt(rowIndex, 5);
            txtUserMiddleName.setText(middleName);
            
            String lastName = (String) jTable1.getValueAt(rowIndex, 6);
            txtUserLastName.setText(lastName);
            

            int roleID = LoginDAO.getInstance().getLoginByID(Integer.parseInt(userID)).getRoleName().getRoleID();
            String roleName = LoginDAO.getInstance().getLoginByID(Integer.parseInt(userID)).getRoleName().getRoleName();
            cboRole.setSelectedItem(roleID + "-" + roleName);

            String userContactInfor = (String) jTable1.getValueAt(rowIndex, 7);
            txtUserContacInfo.setText(userContactInfor);

            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    void resetComponent() {
        txtUserID.setText("");
        txtUserName.setText("");
        txtPassword.setText("");
        txtUserFirstName.setText("");
        txtUserMiddleName.setText("");
        txtUserLastName.setText("");
        txtUserContacInfo.setText("");
        
    }
    

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        btnAddUser = new javax.swing.JButton();
        btnDeleteLogin = new javax.swing.JButton();
        btnEdit = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        txtUserID = new javax.swing.JTextField();
        txtUserName = new javax.swing.JTextField();
        txtPassword = new javax.swing.JPasswordField();
        txtUserFirstName = new javax.swing.JTextField();
        txtUserMiddleName = new javax.swing.JTextField();
        txtUserLastName = new javax.swing.JTextField();
        txtUserContacInfo = new javax.swing.JTextField();
        cboRole = new javax.swing.JComboBox();
        btnSave = new javax.swing.JButton();
        btnCanel = new javax.swing.JButton();

        setBackground(new java.awt.Color(255, 255, 153));

        jLabel1.setFont(new java.awt.Font("Times New Roman", 1, 24)); // NOI18N
        jLabel1.setText("Quan Ly Nhan Vien");

        jTable1.setBackground(new java.awt.Color(153, 255, 153));
        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null}
            },
            new String [] {
                "UserID", "PassWord", "RoleID", "UserFirstName", "UserMiddleName", "UserLastName", "UserContactInfo"
            }
        ));
        jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable1MouseClicked(evt);
            }
        });
        jTable1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTable1KeyReleased(evt);
            }
        });
        jScrollPane1.setViewportView(jTable1);

        btnAddUser.setText("Them NV");
        btnAddUser.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnAddUserMouseClicked(evt);
            }
        });
        btnAddUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddUserActionPerformed(evt);
            }
        });

        btnDeleteLogin.setText("Xoa NV");
        btnDeleteLogin.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnDeleteLoginMouseClicked(evt);
            }
        });

        btnEdit.setText("Chinh Sua TTNV");
        btnEdit.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnEditMouseClicked(evt);
            }
        });
        btnEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditActionPerformed(evt);
            }
        });

        jLabel2.setText("UserID        :");

        jLabel3.setText("User Name  :");

        jLabel4.setText("Password    :");

        jLabel5.setText("UserFirstName     :");

        jLabel6.setText("UserMiddleName  :");

        jLabel7.setText("UserLastName     :");

        jLabel8.setText("Role                    :");

        jLabel9.setText("UserContactInfo :");

        btnSave.setText("Save");
        btnSave.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnSaveMouseClicked(evt);
            }
        });

        btnCanel.setText("Canel");
        btnCanel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnCanelMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGap(302, 302, 302))
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(42, 42, 42)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtUserID)
                            .addComponent(txtUserName)
                            .addComponent(txtPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE))
                        .addGap(41, 41, 41)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtUserFirstName)
                            .addComponent(txtUserMiddleName)
                            .addComponent(txtUserLastName, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE))
                        .addGap(38, 38, 38)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)
                            .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(btnCanel, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(cboRole, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtUserContacInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 906, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(268, 268, 268)
                        .addComponent(btnAddUser, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnDeleteLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnEdit)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(32, 32, 32)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel5)
                    .addComponent(jLabel8)
                    .addComponent(txtUserID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUserFirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cboRole, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel6)
                    .addComponent(jLabel9)
                    .addComponent(txtUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUserMiddleName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUserContacInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jLabel7)
                    .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUserLastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnCanel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(40, 40, 40)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnAddUser, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDeleteLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(48, 48, 48))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed
        // TODO add your handling code here:

    }//GEN-LAST:event_btnEditActionPerformed

    private void btnAddUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddUserActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnAddUserActionPerformed

    private void btnDeleteLoginMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnDeleteLoginMouseClicked
        // TODO add your handling code here:
        int rowIndex= jTable1.getSelectedRow();
        //
        String strID = (String) jTable1.getValueAt(rowIndex, 0);
        int id = Integer.parseInt(strID);
        
        int dialogButton = JOptionPane.YES_NO_OPTION;
        int i = JOptionPane.showConfirmDialog(null, "Ban co chac la muon xoa phong");
        if (i == JOptionPane.YES_OPTION) {
            
                LoginDAO.getInstance().deleteUser(id);
            
            JOptionPane.showMessageDialog(this, "Da xoa phong");
            loadTableLogin(refreshCourseList());
        } else {
            remove(dialogButton);
        }
    }//GEN-LAST:event_btnDeleteLoginMouseClicked

    private void btnAddUserMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAddUserMouseClicked
        // TODO add your handling code here:
       resetComponent();
       setEnableComponent(true);
    }//GEN-LAST:event_btnAddUserMouseClicked

    private void jTable1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTable1KeyReleased
        // TODO add your handling code here:
        btnDeleteLogin.setEnabled(true);
        btnEdit.setEnabled(true);
        binding();
    }//GEN-LAST:event_jTable1KeyReleased

    private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable1MouseClicked
        // TODO add your handling code here:
        btnDeleteLogin.setEnabled(true);
        btnEdit.setEnabled(true);
        binding();
    }//GEN-LAST:event_jTable1MouseClicked

    private void btnCanelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCanelMouseClicked
        // TODO add your handling code here:
        setEnableComponent(false);
    }//GEN-LAST:event_btnCanelMouseClicked

    private void btnSaveMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSaveMouseClicked
        // TODO add your handling code here:
        
       String userName = txtUserName.getText();
        
        String password = txtPassword.getText();
        
        
        String userFirstName = txtUserFirstName.getText();
        String userMiddleName = txtUserMiddleName.getText();
        String userLastName = txtUserLastName.getText();
        
        String roleName = cboRole.getSelectedItem().toString();
        String[] arr1 = roleName.split("-");
        int idRoleName = Integer.parseInt(arr1[0]);        
        Role rt = RoleDAO.getInstance().getRoleByID(idRoleName);
        
        String userContactInfo = txtUserContacInfo.getText();
        
        if (txtUserID.getText().equals("")) {
            Login login = new Login(userName, password, rt, userFirstName, userMiddleName, userLastName, userContactInfo,true);
            if (LoginDAO.getInstance().createLogin(login)) {
                JOptionPane.showMessageDialog(null, "Thêm mới thành công");
            } else {
                JOptionPane.showMessageDialog(null, "Lỗi");
            }
            resetComponent();
            setEnableComponent(false);
            loadTableLogin(refreshCourseList());
        } else {
            String strID = txtUserID.getText();
            int id = Integer.parseInt(strID);
            Login login = new Login(id, userName, password, rt, userFirstName, userMiddleName, userLastName, userContactInfo, true);
            if (LoginDAO.getInstance().updateLogin(login)) {
                JOptionPane.showMessageDialog(null, "Cập nhật thành công");
            }else{
                JOptionPane.showMessageDialog(null, "Có lỗi xảy ra");
            }
            resetComponent();
            loadTableLogin(refreshCourseList());
            setEnableComponent(false);
        }
    }//GEN-LAST:event_btnSaveMouseClicked

    private void btnEditMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnEditMouseClicked
        // TODO add your handling code here:
        setEnableComponent(true);
    }//GEN-LAST:event_btnEditMouseClicked


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAddUser;
    private javax.swing.JButton btnCanel;
    private javax.swing.JButton btnDeleteLogin;
    private javax.swing.JButton btnEdit;
    private javax.swing.JButton btnSave;
    private javax.swing.JComboBox cboRole;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JPasswordField txtPassword;
    private javax.swing.JTextField txtUserContacInfo;
    private javax.swing.JTextField txtUserFirstName;
    private javax.swing.JTextField txtUserID;
    private javax.swing.JTextField txtUserLastName;
    private javax.swing.JTextField txtUserMiddleName;
    private javax.swing.JTextField txtUserName;
    // End of variables declaration//GEN-END:variables
}
